/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2012
 */

package com.juezhuo.ocrs.rentalcar.dao.example;


import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;
import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;

import com.juezhuo.ocrs.common.dao.common.BaseIbatis3Dao;
import com.juezhuo.ocrs.rentalcar.domain.example.Example;
import com.juezhuo.ocrs.rentalcar.domain.query.ExampleQuery;
import org.springframework.stereotype.Repository;


@Repository
public class ExampleDaoImpl extends BaseIbatis3Dao<Example, Integer> implements ExampleDao {

    @Override
    public String getIbatisMapperNamesapce() {
        return "Example";
    }

    public int saveOrUpdate(Example entity) {
        int count = 0;
        if (entity.getId() == null) {
            count = save(entity);
        } else {

            count = update(entity);
        }
        return count;
    }

    public Page findPage(ExampleQuery query) {
        return pageQuery("Example.findPage", query);
    }


}